MQTT_Publish block
Short summary
Name |
|
→POU type |
|
Category |
|
Graphical interface |
|
Available since |
This block is supported for →Raspberry Pi. |
Functionality
The block publishes a message for a given topic via the connection that is specified by the connection handler. The messages are published asynchronously.
The data is transferred by means of an already existing MQTT broker (see "Preparing/Realizing data transfer via MQTT").
Inputs, outputs
|
Identifier |
Description |
|
---|---|---|---|
Inputs: |
|
|
connection handler (as obtained by the MQTT_Connect block) |
|
|
topic for the message |
|
|
|
payload of the message |
|
|
|
length of the payload to publish |
|
Outputs: |
|
|
return code of involved MQTT functions as specified in data type |
Input EN
and output ENO
are available when →calling the block. See "Execution control: EN, ENO" for information on input EN
and output ENO
.
See:
-
"Blocks for safe logic" whether this block is supported for developing safety-relevant applications.
-
"Highlighting safe logic in the FBD-editor" for the effects when using the block as a block for safe logic.
Example for usage within ST-editor
Program with selected calls of MQTT blocks |
---|
|
When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.